# -*- coding:utf8 -*-
import xlrd
import os


id = u'85028'

def find(path,id):
    for rt, dirs, files in os.walk(path):
        for f in files:
            if f != ".DS_Store":
                path = rt+os.path.sep+f
                workbook = xlrd.open_workbook(path)
                sheet_names = workbook.sheet_names()
                all_value = workbook.sheet_by_index(0)
                length = all_value.nrows
                for i in xrange(length):
                    row = all_value.row_values(i)
                    if id in row[0]:
                        print row[1].encode('utf8'),row[8]
                    # print path
                    # break

if __name__ == "__main__":
    path = r"/Users/liruopeng/Downloads/score/english"
    while 1:
        nID = raw_input("请输入学号中的一部分：")
        find(path,nID)
